<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div class="box">
        <button @click="getMessAge1(888)">点击传递一个参数</button>
        <button @click="getMessAge2(888,'红苹果')">点击传递二个参数</button>
        <button @click="getMessAge3($event,888,'红苹果')">点击传递多个参数</button>
        <button @click="getMessAge4($event)">点击传递事件对象</button>
        <button @click="getMessAge5()">点击不传递参数</button>


    </div>
</body>
</html>
<script>
    const VM = new Vue({
        el:'.box',
        methods:{
            getMessAge1(params){
                console.log(params)
            },
            getMessAge2(params,params1){
                console.log(params,params1)
            },
            getMessAge3(e,params1,params2){
                console.log(e,params1,params2)
            },
            getMessAge4(e){
                console.log(e)
            },
            getMessAge5(params){
                console.log(params)
            },
        }
    })
</script>